<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ page import="net.ojbk.jiaofu.service.*" import="net.ojbk.jiaofu.po.*" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>师易教辅平台</title>
	<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
	<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
	<link href="css/prettyPhoto.css" rel="stylesheet" type="text/css" />
	<link href="css/font-awesome.css" rel="stylesheet">
	<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
	<script src="js/jquery.quicksand.js" type="text/javascript"></script>
	<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
	<style>
		a:link {color: black;}
				/*font-size: 5px;}*/
		.home-body-box .other-login-wrapper .other-login .login-logo svg, .login-body .other-login-wrapper .other-login .login-logo svg, .logon-body .other-login-wrapper .other-login .login-logo svg {
        width: 100%;
        height: 100%;
    	} 
    	.fontQAQ {
    		font-family: 微软雅黑；
    	}
	    .home-footer {
	        font-size: .875rem;
	        line-height: 2;
	        width: 100%;
	        margin: 5.5vh 0;
	        text-align: center;
	        color: #fff;
	    }
	    .home-footer a:not([class]) {
	        color: #fff;
	    }
	    .home-footer a {
	        margin: 0 2px;
	    }
	</style>
<script>
	function jump(){
	 window.location.href="publishImage.jsp";
	}
</script>
</head>
<%
session.setAttribute("myId", "88888");
session.setAttribute("login", true);

String userId = "null";
boolean isLogin = false;
SyTask[] allLaunchTask = new SyTask[0]; //  需要显示的信息
// 判断是否登录
if ((session != null && session.getAttribute("login") != null && (boolean)session.getAttribute("login"))) { //如果登录
	userId = (String)session.getAttribute("myId");
	isLogin = true;
	allLaunchTask = TaskService.getAllPushTask(userId); // TODO 需要修改
}
%>
<body>
		<div class="top_header" id="home">
		<!-- Fixed navbar -->
		<nav class="navbar navbar-default navbar-fixed-top">
			<div class="nav_top_fx_w3ls_agileinfo">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					    aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
					<div class="logo-w3layouts-agileits">
						<h1> <a class="navbar-brand" href="index.jsp"><i class="fa fa-clone" aria-hidden="true"></i> 师易教辅平台 <span class="desc">实现一站式服务标准化</span></a></h1>
					</div>
				</div>
				<div id="navbar" class="navbar-collapse collapse">
					<div class="nav_right_top">
						<ul class="nav navbar-nav navbar-right">
							<li><a class="request" href="登陆界面.jsp">Login</a></li>

						</ul>
						<ul class="nav navbar-nav">
							<li><a href="主页.jsp">主页</a></li>
							<li class="active"><a href="师易教辅平台.jsp">师易教辅平台</a></li>
							<li><a href="师易赛事服务平台.jsp">师易赛事服务平台</a></li>

								</ul>
							</li>
						</ul>
					</div>
				</div>
				<!--/.nav-collapse -->
			</div>
		</nav>
	</div>
		<div class="banner_bottom">
		<div class="container">
			<h3 class="tittle-w3ls">Projects</h3>
			<div class="inner_sec_info_wthree_agile">
				<!--/projects-->
				<ul class="portfolio-categ filter">

					<li class="cat-item-1 active">
						<a href="teacherHome.jsp" title="Category 2">发布的任务</a>
					</li>
					<li class="cat-item-2">
						<a href="home.jsp" title="Category 1">进行中的任务</a>
					</li>
				</ul>


				<ul class="portfolio-area">
					<%
					for (int i=0; i<allLaunchTask.length; i++) {
					%>
					
					<li class="portfolio-item2" data-id="id-0" data-type="cat-item-4" >
						<div style="height=800px">
							<span class="image-block block2 img-hover">
							<a class="image-zoom" href="images/g1.jpg" rel="prettyPhoto[gallery]">
							<a href="http://localhost:8080/jiaofu_shiyi_ojbk/Taskstatistics.jsp?taskId=<%=allLaunchTask[i].getTaskId()%>">
									<img src="images/g1.jpg" class="img-responsive" alt="Conceit">
									<div class="port-info">
											<h5><%= allLaunchTask[i].getTitle() %></h5>
											<p> <%= allLaunchTask[i].getContent().substring(0, allLaunchTask[i].getContent().length()<200 ? allLaunchTask[i].getContent().length() : 100) %> </p>
										</div>
							</a>
							</a>
						</span>
						</div>
					</li>
					
					<% } %>
					
					<div class="clearfix"></div>
				</ul>
				<!--end portfolio-area -->

			</div>

		</div>
		<!--//projects-->
	<div class="newsletter_w3ls_agileits">
		<div class="col-sm-6 newsleft">
			<h3>发布新的学习任务/教育活动？</h3>
		</div>
		<div class="col-sm-6 newsright">
			<form action="#" method="post">
				<input type="email" placeholder="在这里可以发布任意的所需提交的学习任务或者是教育活动...." name="email" required="">
				<input type="button" value="发布" onclick="javascrtpt:jump()">
			</form>
		</div>
	</div>
		<footer class="home-footer">
		<div>
			<div>
				<span class="fontQAQ">
					©
					<span>
						<font color="black" size="3px">师易OJBK.NET |</font>  
						<a href="#" class="btn-link"> <font  size="3px">关于我们</font> </a>
						 <font color="black" size="3px">|</font> 
						 <a href="#" class="btn-link"> <font size="3px">联系我们</font> </a>
						 <font color="black" size="3px">|</font>
						 <a href="#" target="_blank"> <font size="3px" color="black">粤ICP备12009483号-3</font> </a>
					</span>
				</span>
			</div>
			<div class="fontQAQ">
				            <font color="black" size="3px">师易(OJBK.NET)是由华东交通大学软件学院大学自主团体开发实现的一款功能强大的web-app</font>

			</div>
		</div>
	</footer>
</body>
</html>